Integrand size = 21, antiderivative size = 61 \[ \int \left (a+b \sec ^3(e+f x)\right ) \tan ^3(e+f x) \, dx=\frac {a \log (\cos (e+f x))}{f}+\frac {a \sec ^2(e+f x)}{2 f}-\frac {b \sec ^3(e+f x)}{3 f}+\frac {b \sec ^5(e+f x)}{5 f} \]
Time = 0.33 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.97 \[ \int \left (a+b \sec ^3(e+f x)\right ) \tan ^3(e+f x) \, dx=-\frac {b \sec ^3(e+f x)}{3 f}+\frac {b \sec ^5(e+f x)}{5 f}+\frac {a \left (2 \log (\cos (e+f x))+\tan ^2(e+f x)\right )}{2 f} \]
-1/3*(b*Sec[e + f*x]^3)/f + (b*Sec[e + f*x]^5)/(5*f) + (a*(2*Log[Cos[e + f *x]] + Tan[e + f*x]^2))/(2*f)
Time = 0.27 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.90, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 4626, 2333, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^3(e+f x) \left (a+b \sec ^3(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (e+f x)^3 \left (a+b \sec (e+f x)^3\right )dx\) |
\(\Big \downarrow \) 4626 |
\(\displaystyle -\frac {\int \left (1-\cos ^2(e+f x)\right ) \left (a \cos ^3(e+f x)+b\right ) \sec ^6(e+f x)d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 2333 |
\(\displaystyle -\frac {\int \left (b \sec ^6(e+f x)-b \sec ^4(e+f x)+a \sec ^3(e+f x)-a \sec (e+f x)\right )d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {-\frac {1}{2} a \sec ^2(e+f x)-a \log (\cos (e+f x))-\frac {1}{5} b \sec ^5(e+f x)+\frac {1}{3} b \sec ^3(e+f x)}{f}\) |
-((-(a*Log[Cos[e + f*x]]) - (a*Sec[e + f*x]^2)/2 + (b*Sec[e + f*x]^3)/3 - (b*Sec[e + f*x]^5)/5)/f)
3.5.53.3.1 Defintions of rubi rules used
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ ExpandIntegrand[(c*x)^m*Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> Module[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-(f *ff^(m + n*p - 1))^(-1) Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff* x)^n)^p/x^(m + n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p]
Time = 1.56 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.80
method | result | size |
derivativedivides | \(\frac {\frac {b \sec \left (f x +e \right )^{5}}{5}-\frac {b \sec \left (f x +e \right )^{3}}{3}+\frac {a \sec \left (f x +e \right )^{2}}{2}-a \ln \left (\sec \left (f x +e \right )\right )}{f}\) | \(49\) |
default | \(\frac {\frac {b \sec \left (f x +e \right )^{5}}{5}-\frac {b \sec \left (f x +e \right )^{3}}{3}+\frac {a \sec \left (f x +e \right )^{2}}{2}-a \ln \left (\sec \left (f x +e \right )\right )}{f}\) | \(49\) |
parts | \(\frac {a \left (\frac {\tan \left (f x +e \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {b \left (\frac {\sec \left (f x +e \right )^{5}}{5}-\frac {\sec \left (f x +e \right )^{3}}{3}\right )}{f}\) | \(57\) |
risch | \(-i a x -\frac {2 i a e}{f}+\frac {2 a \,{\mathrm e}^{8 i \left (f x +e \right )}-\frac {8 b \,{\mathrm e}^{7 i \left (f x +e \right )}}{3}+6 a \,{\mathrm e}^{6 i \left (f x +e \right )}+\frac {16 b \,{\mathrm e}^{5 i \left (f x +e \right )}}{15}+6 a \,{\mathrm e}^{4 i \left (f x +e \right )}-\frac {8 b \,{\mathrm e}^{3 i \left (f x +e \right )}}{3}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{5}}+\frac {a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f}\) | \(135\) |
Time = 0.26 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.97 \[ \int \left (a+b \sec ^3(e+f x)\right ) \tan ^3(e+f x) \, dx=\frac {30 \, a \cos \left (f x + e\right )^{5} \log \left (-\cos \left (f x + e\right )\right ) + 15 \, a \cos \left (f x + e\right )^{3} - 10 \, b \cos \left (f x + e\right )^{2} + 6 \, b}{30 \, f \cos \left (f x + e\right )^{5}} \]
1/30*(30*a*cos(f*x + e)^5*log(-cos(f*x + e)) + 15*a*cos(f*x + e)^3 - 10*b* cos(f*x + e)^2 + 6*b)/(f*cos(f*x + e)^5)
Time = 0.38 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.34 \[ \int \left (a+b \sec ^3(e+f x)\right ) \tan ^3(e+f x) \, dx=\begin {cases} - \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac {b \tan ^{2}{\left (e + f x \right )} \sec ^{3}{\left (e + f x \right )}}{5 f} - \frac {2 b \sec ^{3}{\left (e + f x \right )}}{15 f} & \text {for}\: f \neq 0 \\x \left (a + b \sec ^{3}{\left (e \right )}\right ) \tan ^{3}{\left (e \right )} & \text {otherwise} \end {cases} \]
Piecewise((-a*log(tan(e + f*x)**2 + 1)/(2*f) + a*tan(e + f*x)**2/(2*f) + b *tan(e + f*x)**2*sec(e + f*x)**3/(5*f) - 2*b*sec(e + f*x)**3/(15*f), Ne(f, 0)), (x*(a + b*sec(e)**3)*tan(e)**3, True))
Time = 0.20 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.84 \[ \int \left (a+b \sec ^3(e+f x)\right ) \tan ^3(e+f x) \, dx=\frac {30 \, a \log \left (\cos \left (f x + e\right )\right ) + \frac {15 \, a \cos \left (f x + e\right )^{3} - 10 \, b \cos \left (f x + e\right )^{2} + 6 \, b}{\cos \left (f x + e\right )^{5}}}{30 \, f} \]
1/30*(30*a*log(cos(f*x + e)) + (15*a*cos(f*x + e)^3 - 10*b*cos(f*x + e)^2 + 6*b)/cos(f*x + e)^5)/f
Leaf count of result is larger than twice the leaf count of optimal. 271 vs. \(2 (55) = 110\).
Time = 0.69 (sec) , antiderivative size = 271, normalized size of antiderivative = 4.44 \[ \int \left (a+b \sec ^3(e+f x)\right ) \tan ^3(e+f x) \, dx=-\frac {60 \, a \log \left ({\left | -\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1 \right |}\right ) - 60 \, a \log \left ({\left | -\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 1 \right |}\right ) + \frac {137 \, a + 16 \, b + \frac {805 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {80 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {1730 \, a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {80 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {1730 \, a {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {240 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {805 \, a {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {137 \, a {\left (\cos \left (f x + e\right ) - 1\right )}^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}}{{\left (\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right )}^{5}}}{60 \, f} \]
-1/60*(60*a*log(abs(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1)) - 60*a*lo g(abs(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 1)) + (137*a + 16*b + 805*a *(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 80*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1730*a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 80*b*(cos(f *x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 1730*a*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 240*b*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 805*a*(co s(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 137*a*(cos(f*x + e) - 1)^5/(cos(f *x + e) + 1)^5)/((cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1)^5)/f
Time = 24.52 (sec) , antiderivative size = 167, normalized size of antiderivative = 2.74 \[ \int \left (a+b \sec ^3(e+f x)\right ) \tan ^3(e+f x) \, dx=\frac {2\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+\left (-6\,a-4\,b\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+\left (6\,a-\frac {4\,b}{3}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+\left (-2\,a-\frac {4\,b}{3}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+\frac {4\,b}{15}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-1\right )}-\frac {2\,a\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\right )}{f} \]
((4*b)/15 - tan(e/2 + (f*x)/2)^2*(2*a + (4*b)/3) - tan(e/2 + (f*x)/2)^6*(6 *a + 4*b) + tan(e/2 + (f*x)/2)^4*(6*a - (4*b)/3) + 2*a*tan(e/2 + (f*x)/2)^ 8)/(f*(5*tan(e/2 + (f*x)/2)^2 - 10*tan(e/2 + (f*x)/2)^4 + 10*tan(e/2 + (f* x)/2)^6 - 5*tan(e/2 + (f*x)/2)^8 + tan(e/2 + (f*x)/2)^10 - 1)) - (2*a*atan h(tan(e/2 + (f*x)/2)^2))/f